package com.huilian.iotbox.admin.wap.service.impl;

import com.huilian.iotbox.admin.wap.dao.OrderItemDao;
import com.huilian.iotbox.admin.wap.service.OrderItemService;
import com.huilian.iotbox.data.common.ServerResponse;
import com.huilian.iotbox.data.dto.OrderItemDto;
import com.huilian.iotbox.data.dto.StatsUserDto;
import com.huilian.iotbox.data.vo.OrderItemVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author LinYinDong
 * @date 2023/12/23 11:07
 */
@Service
public class OrderItemServiceImpl implements OrderItemService {
    @Resource
    private OrderItemDao orderItemDao;
    @Override
    public ServerResponse findOrderItemByOrderIdList(OrderItemDto orderItemDto) {
        return ServerResponse.createBySuccess(orderItemDao.findOrderItemByOrderIdList(orderItemDto));
    }

    @Override
    public OrderItemVo findOrderItemDayStatistics(StatsUserDto statsUserDto) {
        return orderItemDao.findOrderItemDayStatistics(statsUserDto);
    }

    @Override
    public List<OrderItemVo> findProductDetails(OrderItemDto orderItemDto) {
        return orderItemDao.findProductDetails(orderItemDto);
    }
}
